<?php
declare (strict_types = 1);

namespace app\home\controller;

use app\common\controller\Frontend;
use think\facade\Db;
use think\facade\View;

class SinglePage extends Frontend
{
    public function initialize()
    {
        parent::initialize();
    }
    public function index(){
        //获得列表
        $pagecate = Db::name('page')->where(array('status' => 1))->order('ordid')->select();

        $id=request()->param('id');
        $page = Db::name('page')->where(array('id' => $id,'status' => 1))->order('ordid')->find();
        $title = $page['title'];
        $return_data=[
            'pagecate'=> $pagecate ,
            'title'=> $title,
            'page'=> $page,
            'id'=>$id
        ];
        return \view('index',$return_data);
    }


}